<?php

define('NV_MAINFILE','mainfile');

$_SERVER["REDIRECT_URL"]="phoimau/";
$_SERVER["REQUEST_URI"]="phoimau/";

require_once('config.php');
require_once('class/xtemplate.class.php');
require_once('class/cache.class.php');
require_once('class/request.class.php');
require_once('class/class.php');

/* Kiem Tra Xem Co Dong Cua Web Site Khong */
if(SITE_OFF){        
     include('modules/main/offsite.php'); 
	 die();   
}
/* #Kiem Tra Xem Co Dong Cua Web Site Khong  */

//Chèn Class
$nv_Request = new Request();//Class Ve Lay Noi Dung
$cache = new Cache;
//#Chèn Class

include($file_codinh['menu']);

$nav_get = $nv_Request->get_string('nv','get','right');
if($nav_get!='right'){
	$func = $db->fetch_assoc("SELECT `func` FROM tb_menu WHERE `alias` = '" .$nav_get. "'");
	if (@array_key_exists($func['func'],$file_include))
		include($file_include[$func['func']]);
	else
		include($file_include['right']);	
}
else
	include($file_include['right']);
	
include($file_codinh['left']);
include($file_codinh['head']);// đưa heaf.php xuống cuối cùng để cập nhật lại thẻ trong <HEAD></HEAD>

$cont .= $head;
$cont .= $content; 

echo $cont;//xuất mã html
?>